package com.blb.community.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.blb.community.entity.ZyRoom;
import com.blb.community.entity.ZyUnit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.blb.community.entity.vo.UnitVO;

import java.util.List;

/**
 * <p>
 * 单元  Mapper 接口
 * </p>
 *
 * @author 帅帅
 * @since 2022-07-02
 */
public interface ZyUnitMapper extends BaseMapper<ZyUnit> {

    IPage<UnitVO> getListPage( UnitVO unitVO,IPage<UnitVO> page);

    /**
     * 通过名称查看是否存在
     */
    ZyUnit getByName(UnitVO unitVO);
    /**
     * 查询单元是否有房屋
     */
    List<ZyRoom> getRoomByUnitId(long unitId);

    /**
     * 通过buildingName查询对应单元
     * @param buildingName
     * @return
     */
    List<ZyUnit> selectUnit(String buildingName);
}
